<!DOCTYPE html>

<!-- Measures the delay between two successive short-delay timeouts.
  Note that scheduler allows a small number of quick tasks to run without
  throttling, so the delay is 20ms to avoid this.
-->
<script>
addEventListener('message', (e) => {
  setTimeout(() => {
    let start = performance.now();
    setTimeout(() => {
      let end = performance.now();
      e.source.postMessage(end - start, e.origin);
    }, 20);
  }, 20);
});
</script>
